package StudyCode.summary.textfile;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ReadTestFileLineByLineWithBufferedReader {
	public static void main(String[] args) {
		File file = new File("E:/Copy/test1.txt");
		BufferedReader reader = null;
		try {
			reader = new BufferedReader(new FileReader(file));
			for (String line = reader.readLine(); line != null; line = reader
					.readLine()) {
				System.out.println(line);
			}
		} catch (IOException e) {
			System.exit(1);
		} finally {
			if (reader != null) {
				try {
					reader.close();
				} catch (IOException ignored) {
				}
			}
		}
	}
}
